const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: [
    'vuetify',
  ],
  pluginOptions: {
    electronBuilder: {
      customFileProtocol: "./",
     
      preload: 'src/preload.js',
      builderOptions: {
        win: {
          target: 'nsis',
          icon: 'public/ETE-256-logo.ico',
          requestedExecutionLevel: 'requireAdministrator'
        },
        nsis: {
          oneClick: false,
          allowToChangeInstallationDirectory: true,
          include: 'build/installer.nsh'
        },
        extraResources: [
          {
            from: 'src/preload.js', // 源文件路径
            to: 'preload.js' // 目标文件路径
          },
          {
            from: 'resources/',
            to: 'resources/'
          }
        ]
      }
    }
  },
  configureWebpack: {
   
    resolve: {
      fallback: {
      fs: false,
  
     




    }}

  },
  devServer: {
    proxy: {
      '/some-endpoint': {
        target: 'http://192.168.1.10',
        changeOrigin: true,
        pathRewrite: {'^/some-endpoint': ''}
      }
    }
  },
  

})
